package homework4.exp3;

/**
 * @author fengq
 */
public class Producer extends Thread {
    private SharedData sharedData;
    public  Producer(SharedData sharedData){
        for (char ch='A';ch<='D';ch++){
            try {
                Thread.sleep((int)Math.random()*3000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
            sharedData.putShareChar(ch);
        }
    }
}
